package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 证件类型的枚举类
 *
 * @author 合房源码
 */
@Getter
@AllArgsConstructor
public enum IdTypeEnum {

    ID("1", "身份证"),
    PASSPORT("2","护照"),
    TAIWAN_PASSPORT("3","台胞证"),
    HKORMACAO_PASSPORT("4","港澳居民通行证"),
    MILITARY_ID("5","港澳居民通行证"),
    OTHER("6","其他"),
    ;

    private String code;
    private String msg;

    public static String getName(String code) {
        for (IdTypeEnum c : IdTypeEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.msg;
            }
        }
        return null;
    }
}
